image1 = new Image();
image1.src = "podutikrecords1.jpg";
image2 = new Image();
image2.src = "podutikrecords2.jpg";
playit1 = new Image();
playit1.src = "play1.png";
playit2 = new Image();
playit2.src = "play2.png";
playit12 = new Image();
playit12.src = "play12.png";
playit22 = new Image();
playit22.src = "play22.png";
buyit1 = new Image();
buyit1.src = "buyitnovo.jpg";
buyit2 = new Image();
buyit2.src = "buyit2novo.jpg";

$(document).ready(function(){	

	$(".thrash").mouseover(function(){
		$(this).animate({width: '85%', heigth: '85%'}, "fast")
	});
	
	$(".reginp").mouseover(function(){
		$(this).css("background-color","#FFA500");
	});
	
	$(".reginp").mouseout(function(){
		$(this).css("background-color","white");
	});
	
	$(".thrash").mouseout(function(){
		$(this).animate({width: '73%', heigth: '73%'}, "fast")
	});

	$("#ok, #checkout").mouseover(function(){
		$(this).animate({'marginRight' : "-=10px"}, "fast")
	});
	
	$("#ok, #checkout").mouseout(function(){
		$(this).animate({'marginRight' : "+=10px"}, "fast")
	});
	
	$("#register, #log").mouseover(function(){
		//$(this).animate({width: '106%', heigth: '106%'}, "fast")
		$(this).animate({'marginTop' : "+=4px"}, "fast")
	});
	
	$("#register, #log").mouseout(function(){
		//$(this).animate({width: '100%', heigth: '100%'}, "fast")
		$(this).animate({'marginTop' : "-=4px"}, "fast")
	});
	
	$(".playit1, .playit2").mouseover(function(){
		$(this).animate({width: '80%', heigth: '80%'}, "fast")
	});
	
	$(".playit1, .playit2").mouseout(function(){
		$(this).animate({width: '73%', heigth: '73%'}, "fast")
	});
	
	$(".buyit").mouseover(function(){
		$(this).animate({width: '183%', heigth: '183%'}, "fast")
	});
	
	$(".buyit").mouseout(function(){
		$(this).animate({width: '166%', heigth: '166%'}, "fast")
	});
	
	$("#sidebar-a a").mouseover(function(){
		$(this).css("padding-left","10px");
		$(this).css("color","#FFCF00");
		$(this).css("font-weight","bold");
	});
	
	$("#sidebar-a a").mouseout(function(){
		$(this).css("padding-left","0px");
		$(this).css("color","#444444");
		$(this).css("font-weight","normal");
	});
	
	$("#search-bar a, #main-nav a").mouseover(function(){
		$(this).css("color","#FF8F00");
	});
	
	$("#search-bar a, #main-nav a").mouseout(function(){
		$(this).css("color","#444444");
	});
});

function mouseOver( e ){   
   
   if ( e.target.getAttribute("class") == "playit1")
   {
		e.target.setAttribute( "src", playit12.getAttribute( "src" ) );
   }
   
   if ( e.target.getAttribute("class") == "playit2")    
   {
		e.target.setAttribute( "src", playit22.getAttribute( "src" ) );
   }
   
   if ( e.target.getAttribute("class") == "buyit")    
   {
		e.target.setAttribute( "src", buyit2.getAttribute( "src" ) );
   }
} 

function mouseOut( e ){

   if ( e.target.getAttribute("id") == "logo1")
   {
      e.target.setAttribute( "src", image1.getAttribute( "src" ) );
	  e.target.setAttribute( "style", "border-top: 2px solid #FF8F00; border-left: 2px solid #FF8F00; border-bottom: 2px solid #FF8F00;");
   } 
   
   if ( e.target.getAttribute("class") == "playit1")
   {
		e.target.setAttribute( "src", playit1.getAttribute( "src" ) );
   }
   
   if ( e.target.getAttribute("class") == "playit2")
   {
		e.target.setAttribute( "src", playit2.getAttribute( "src" ) );
   }
   
   if ( e.target.getAttribute("class") == "buyit")    
   {
		e.target.setAttribute( "src", buyit1.getAttribute( "src" ) );
   }
}

document.addEventListener( "mouseover", mouseOver, false );
document.addEventListener( "mouseout", mouseOut, false );
